package cn.helios.controller;

import cn.helios.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

//用户服务：暴露接口给订单访问
@RestController
public class UserController {


    @Value("${server.port}")
    private Long ip;


    @GetMapping("/user/{id}")
    public User getById(@PathVariable("id")Long id){
        //根据id去数据库查询User

        return  new User(id,"zs:"+id,"我是zs,port:"+ip);
    }
}